package com.fduss.mazegame.server;

import com.fduss.mazegame.core.maze.generator.PrimsAlgo;
import com.fduss.mazegame.core.unit.End;
import com.fduss.mazegame.core.unit.Hero;

/**
 * The serverspec used by the client to create servers that generate
 * random maps.
 */
public class ServerSpecPrim extends ServerSpec {

    public ServerSpecPrim(int rows, int cols, int trailCapacity) {
        super(rows, cols, trailCapacity);
        map = new PrimsAlgo(rows, cols).generateMap();
        this.end = new End(map.getPlace(rows - 1, cols - 1));
        this.hero = new Hero(map.getPlace(0, 0));
        this.trailCapacity = trailCapacity;

        this.monsters = generateMonsters(rows, cols);
        this.treasures = generateTreasure(rows,cols);
    }

    public String toString() {
        return "PRIM";
    }
}
